<!DOCTYPE html>
<html lang="en" >
<head>
<?php @include("../_files/cn/headertag.php")  ?>
<title>Lassa Tyres 拉赛轮胎 | 联系我们</title>
</head>
<body class="contactus-page">

<?php
if(isset($_POST['submit'])) 
{
		//Check to make sure that the name field is not empty
	if(trim($_POST['name']) == '') {
		$hasError = true;
	} else {
		$name = trim($_POST['name']);
	}


	if(trim($_POST['city']) == '') {
		$hasError = true;
	} else {
		$city = trim($_POST['city']);
	}



	//Check to make sure that the phone field is not empty
	if(trim($_POST['phone']) == '') {
		$hasError = true;
	} else {
		$phone = trim($_POST['phone']);
	}


	//Check to make sure sure that a valid email address is submitted
	if(trim($_POST['email']) == '')  {
		$hasError = true;
	} else if (!filter_var( trim($_POST['email'], FILTER_VALIDATE_EMAIL ))) {
		$hasError = true;
	} else {
		$email = trim($_POST['email']);
	}


	//Check to make sure that the subject field is not empty
	if(trim($_POST['subject']) == '') {
		$hasError = true;
	} else {
		$subject = trim($_POST['subject']);
	}


	//Check to make sure comments were entered
	if(trim($_POST['comments']) == '') {
		$hasError = true;
	} else {
		if(function_exists('stripslashes')) {
			$comments = stripslashes(trim($_POST['comments']));
		} else {
			$comments = trim($_POST['comments']);
		}
	}
	
	
	//If there is no error, send the email
	if(!isset($hasError)) {
		
	$message=

	'Full Name:	'.$_POST['name'].'<br /><br />
	City:	'.$_POST['city'].'<br /><br />
	Subject:	'.$_POST['subject'].'<br /><br />
	Phone:	'.$_POST['phone'].'<br /><br />
	Email:	'.$_POST['email'].'<br /><br />
	Comments:	'.$_POST['comments'].'
	';
	
	require '../js/phpmailer/PHPMailerAutoload.php';  
    // Instantiate Class  
    $mail = new PHPMailer();  
      
    // Set up SMTP  
    $mail->IsSMTP();
	$mail->SMTPAuth = true;
	$mail->Host = 'sub5.mail.dreamhost.com';
	$mail->Port = 587;
  
	// Authentication  
	$mail->Username = 'web@lassa.com.cn';
	$mail->Password = 'cc48939658';
	$mail->SetFrom($mail->Username, 'web');
	$mail->CharSet = 'UTF-8';
      
    // Compose
    $mail->SetFrom($_POST['email'], $_POST['name']);
    $mail->AddReplyTo($_POST['email'], $_POST['name']);
    $mail->Subject = "New Contact Form Enquiry";      // Subject (which isn't required)  
    $mail->MsgHTML($message);
 
    // Send To  
     $mail->AddAddress("hakan@lassakombi.com", "Hakan lassa"); // Where to send it - Recipient
	$mail->AddBCC("canyurdaer@gmail.com", "Can Yurdaer");
    $result = $mail->Send();		// Send!  
	unset($mail);
}
}

?>


<?php @include("../_files/cn/navigation.php") ?>


<div class="page-nav">
    <div class="container ">
           <div class="bar">
                  <div class="page-name">关于我们</div>
                       <a class="back" href="index.php">
                            <i class="iconfont icon-xia"></i>主页面
                        </a>
			</div>
			<div class="row">
        		<div class="col-md-8 col-12">
					<div class="row">
						<div class="item col-md-6 col-12 clearfix">
							<img src="../images/contact/c-ico1.svg"  onerror="this.onerror=null; this.src='../images/contact/c-ico1.png'">
							<h4>现在打电话给我们!</h4>
							<div class="desc">+86 22 69585758</div>
						</div>
						<div class="item col-md-6 col-12 clearfix">
							<img src="../images/contact/c-ico2.svg"  onerror="this.onerror=null; this.src='../images/contact/c-ico2.png'">
							<h4>发送电子邮件给我们！</h4>
							<div class="desc">mdkh@mdkh.com</div>
						</div>
						<div class="item col-md-6 col-12 clearfix">
							<img src="../images/contact/c-ico3.svg"  onerror="this.onerror=null; this.src='../images/contact/c-ico3.png'">
							<h4>参观我们的工厂</h4>
							<div class="desc">天津市宁河经济开发区芦汉路58号</div>
						</div>
						<div class="item col-md-6 col-12 clearfix">
							<img src="../images/contact/c-ico4.svg"  onerror="this.onerror=null; this.src='../images/contact/c-ico4.png'">
							<h4>找代理商</h4>
							<div class="desc">可以查所以的代理商</div>
						</div>
					</div>
				</div>

			</div>
           <div class="bread-nav">
            <span>现在你在</span>
            <span>></span>
            <span>联系我们</span>
        </div>
    </div>
</div>



<div class="container-fluid contactmain" >
  <div class="container">
    	<h2>你可以给我们发送邮件</h2>
		<?php @include("../_files/cn/contact_form.php")  ?>
    </div>
  </div>


		
	
		





<?php @include("../_files/cn/footer.php")  ?>


<!-- Information Section -->

<!-- Footer Section Start -->
<!-- Javascript Here -->
<?php @include("../_files/jsfiles.php")  ?>



</body>
</html>